package org.hy.service.mypage;

import org.hy.domain.mypage.MyCareerShow;
import org.hy.domain.mypage.MyInterestShow;
import org.hy.persistence.mypage.MyInterestShowMapper;
import org.hy.util.AppConstant;
import org.hy.util.Pager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class MyInterestShowServiceImpl implements IMyInterestShowService{
	@Autowired
	private MyInterestShowMapper myInterestShowMapper;
	
	@Override
	public int addMyInterestShow(MyInterestShow myInterestShow){
		if(myInterestShow == null)return AppConstant.FAIL;
		return myInterestShowMapper.insertMyInterestShow(myInterestShow);
	}
	
	@Override
	public MyInterestShow findMyInterestShowWithCommentsById(int id,int page,int size){
		int offset = Pager.getOffset(page, size);
		return myInterestShowMapper.findMyInterestShowWithDefaultCommentsById(id, offset, size);
	}
}
